package com.chenxin.transaction.controller;

import com.chenxin.transaction.service.AccountInfoService;
import com.chenxin.transaction.service.TccAccountInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ZhangSanController {

    @Autowired
    TccAccountInfoService tccAccountInfoService;

    @RequestMapping("/transfer")
    public Boolean transfer(@RequestParam("amount") Double amount) {
        this.tccAccountInfoService.updateAccountBalance("1", amount);
        return true;
    }

}
